<template>
  <custom-layout :isTabBar="false" navTitle="登录详情">
    <view class="details">
      <uni-list class="user-info">
        <uni-list-item v-for="item in items" :key="item.key" :title="item.label" :rightText="data[item.key]" />
      </uni-list>
    </view>
  </custom-layout>
</template>

<script>
import { getLoginInfo } from "@/api/system/loginInfo";
export default {
  data() {
    return {
      items: [
        { key: "infoId", label: "访问ID", icon: "" },
        { key: "userName", label: "用户名称", icon: "" },
        { key: "ipAddress", label: "登录地址", icon: "" },
        { key: "loginLocation", label: "登录地点", icon: "" },
        { key: "browser", label: "浏览器类型", icon: "" },
        { key: "os", label: "操作系统", icon: "" },
        { key: "statusName", label: "登录状态", icon: "" },
        { key: "message", label: "提示消息", icon: "" },
        { key: "loginTime", label: "登录时间", icon: "" },
      ],
      data: {},
    };
  },
  onLoad(options) {
    getLoginInfo(options.id).then((res) => (this.data = res));
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
.details {
  width: 100%;
}
</style>
